Skip to content

Accessibility improvements: add missing labels for input fields#2970

Open
labkey-susanh wants to merge 9 commits intodevelopfrom
fb_inputLabels
Open

Accessibility improvements: add missing labels for input fields#2970
labkey-susanh wants to merge 9 commits intodevelopfrom
fb_inputLabels

Conversation

@labkey-susanh
Copy link
Copy Markdown
Contributor

@labkey-susanh labkey-susanh commented Apr 29, 2026

Rationale

For better accessibility of our input forms, we need to provided proper labels for each field and not label things that aren't input fields.

Related Pull Requests

Changes

  • Update locators to account for label changes
  • Add EntityBulkDialog component with specialized methods for the Amounts and Units row with two input fields.

return elementCache().formRowByControlLabel(fieldLabel);
}

public Pair<String, String> getAmountUnit()
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe getAmountAndUnitsReadOnlyValues or something to distinguish it from getAmountUnitValue.
This could also return a record instead of a pair for better readability, but not necessary.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

those changes both sound good. It was previously returning a Pair so I just left that part but agree it is odd.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the name, but left it as a pair for now.

return new Pair<>(amountVal, unitVal);
}

public Pair<String, String> getAmountUnitValue()
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getAmountAndUnitsValues? or getAmountAndUnitsEditableValues?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with either of those, or getAmountAndUnitsInputValues?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better. Done.

Comment thread src/org/labkey/test/components/ui/entities/EntityBulkDialog.java Outdated
}
}

public void disableAmountUnit()
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public void disableAmountUnit()
public void disableAmountAndUnits()

if (toggle != null && !toggle.isOn())
{
toggle.set(true);
_changeCounter++;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is _changeCounter meant to increment by only one when potentially both fields are updated?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmm, yeah I guess so. This was just a refactor so shouldn't have changed (looking at BatchUpdateSamplesDialog on develop, this matches)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. tests seem to agree, so I guess we are counting these together.

Comment thread src/org/labkey/test/components/ui/entities/EntityBulkDialog.java Outdated
Comment thread src/org/labkey/test/components/ui/entities/EntityBulkDialog.java
Comment thread src/org/labkey/test/components/ui/entities/EntityBulkDialog.java Outdated
Comment thread src/org/labkey/test/components/ui/entities/EntityBulkDialog.java Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants